package net.similarsu.device.sdk.dah.library;


import com.sun.jna.Library;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import net.similarsu.device.sdk.dah.callback.FAnalyzerDataCallBack;
import net.similarsu.device.sdk.dah.callback.FDisConnect;
import net.similarsu.device.sdk.dah.callback.FMessCallBack;

public interface DahLibrary extends Library {
    int DH_SERIALNO_LEN = 48;
    int EVENT_IVS_ALL = 0x00000001;       // 订阅所有事件
    int EVENT_IVS_ACCESS_CTL = 0x00000204;      // 门禁事件 (对应 DEV_EVENT_ACCESS_CTL_INFO)
    int EVENT_IVS_CITIZEN_PICTURE_COMPARE = 0x00000209;      // 人证比对事件(对应 DEV_EVENT_CITIZEN_PICTURE_COMPARE_INFO)
    int DH_EVENT_NAME_LEN = 128;              // 事件名称长度
    int DH_MAX_CARDNO_LEN = 32;                // 门禁卡号最大长度
    int DH_MAX_CARDPWD_LEN = 64;              // 最大门禁名称长度
    int DH_COMMON_STRING_20 = 20;               // 通用字符串长度20
    int DH_COMMON_STRING_32 = 32;              // 通用字符串长度32
    int DH_COMMON_STRING_64 = 64;           // 通用字符串长度64
    int DH_COMMON_STRING_128 = 128;           // 通用字符串长度128
    int DH_COMMON_STRING_256 = 256;              // 通用字符串长度256
    int MAX_CLASS_NUMBER_LEN = 32;               // 最大班级长度
    int MAX_PHONENUMBER_LEN = 16;               // 最大电话长度
    int DH_MAX_CARDNAME_LEN = 64;               // 门禁卡命名最大长度
    int DH_MAX_POLYGON_NUM = 16;               // 多边形最大顶点个数
    int NET_MAX_CARDINFO_LEN = 32;//每条卡号最长字符数
    int MAX_COMPANION_CARD_NUM = 6;// 陪同者卡号最大个数
    int MAX_LOG_PATH_LEN = 260;              // 日志路径名最大长度
    int DH_ALARM_ACCESS_CTL_EVENT = 0x3181;           // 门禁事件(对应结构体 ALARM_ACCESS_CTL_EVENT_INFO)
    int DH_MAX_DOORNAME_LEN = 128;              // 最大门禁名称长度
    int MAX_EVENT_ID_LEN = 52;               // 国标事件ID最大长度

    int CLIENT_Init(FDisConnect cbDisConnect, NativeLong dwUser);

    void CLIENT_Cleanup();

    int CLIENT_GetLastError();

    NativeLong CLIENT_LoginEx2(String pchDVRIP, short wDVRPort, String pchUserName, String pchPassword, int emSpecCap, Pointer pCapParam, Pointer lpDeviceInfo, IntByReference error);

    int CLIENT_Logout(NativeLong lLoginID);

    NativeLong CLIENT_RealLoadPictureEx(NativeLong lLoginID, int nChannelID,
                                        int dwAlarmType,
                                        int bNeedPicFile,
                                        FAnalyzerDataCallBack cbAnalyzerData,
                                        NativeLong dwUser,
                                        Pointer Reserved);

    int CLIENT_StopLoadPic(NativeLong lAnalyzerHandle);

    int CLIENT_LogOpen(Pointer pstLogPrintInfo);

    int CLIENT_StartListenEx(NativeLong lLoginID);

    int CLIENT_StopListen(NativeLong lLoginID);

    void CLIENT_SetDVRMessCallBack(FMessCallBack cbMessage, int dwUser);
}
